\doxysubsubsubsection{Initialization and de-\/initialization Functions }
\hypertarget{group___h_a_l___group1}{}\label{group___h_a_l___group1}\index{Initialization and de-\/initialization Functions@{Initialization and de-\/initialization Functions}}


Initialization and de-\/initialization functions.  


\doxysubsubsubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{stm32h7xx__hal__def_8h_a63c0679d1cb8b8c684fbb0632743478f}{HAL\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___h_a_l___group1_gaecac54d350c3730e6831eb404e557dc4}{HAL\+\_\+\+Init}} (void)
\begin{DoxyCompactList}\small\item\em This function is used to initialize the HAL Library; it must be the first instruction to be executed in the main program (before to call any other HAL function), it performs the following\+: Configures the Sys\+Tick to generate an interrupt each 1 millisecond, which is clocked by the HSI (at this stage, the clock is not yet configured and thus the system is running from the internal HSI at 16 MHz). Set NVIC Group Priority to 4. Calls the \doxylink{stm32h7xx__hal__msp_8c_gae4fb8e66865c87d0ebab74a726a6891f}{HAL\+\_\+\+Msp\+Init()} callback function defined in user file "{}stm32h7xx\+\_\+hal\+\_\+msp.\+c"{} to do the global low level hardware initialization. \end{DoxyCompactList}\item 
\mbox{\hyperlink{stm32h7xx__hal__def_8h_a63c0679d1cb8b8c684fbb0632743478f}{HAL\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___h_a_l___group1_ga95911129a26afb05232caaaefa31956f}{HAL\+\_\+\+De\+Init}} (void)
\begin{DoxyCompactList}\small\item\em This function de-\/\+Initializes common part of the HAL and stops the systick. This function is optional. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group___h_a_l___group1_gae4fb8e66865c87d0ebab74a726a6891f}{HAL\+\_\+\+Msp\+Init}} (void)
\begin{DoxyCompactList}\small\item\em Initializes the MSP. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group___h_a_l___group1_gaa2d4540edcb9dacec34edb77f3455bf0}{HAL\+\_\+\+Msp\+De\+Init}} (void)
\begin{DoxyCompactList}\small\item\em De\+Initializes the MSP. \end{DoxyCompactList}\item 
\mbox{\hyperlink{stm32h7xx__hal__def_8h_a63c0679d1cb8b8c684fbb0632743478f}{HAL\+\_\+\+Status\+Type\+Def}} \mbox{\hyperlink{group___h_a_l___group1_ga879cdb21ef051eb81ec51c18147397d5}{HAL\+\_\+\+Init\+Tick}} (uint32\+\_\+t Tick\+Priority)
\begin{DoxyCompactList}\small\item\em This function configures the source of the time base. The time source is configured to have 1ms time base with a dedicated Tick interrupt priority. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsubsubsubsection{Detailed Description}
Initialization and de-\/initialization functions. 

\begin{DoxyVerb} ===============================================================================
              ##### Initialization and de-initialization functions #####
 ===============================================================================
    [..]  This section provides functions allowing to:
      (+) Initializes the Flash interface the NVIC allocation and initial clock
          configuration. It initializes the systick also when timeout is needed
          and the backup domain when enabled.
      (+) De-Initializes common part of the HAL.
      (+) Configure The time base source to have 1ms time base with a dedicated
          Tick interrupt priority.
        (++) SysTick timer is used by default as source of time base, but user
             can eventually implement his proper time base source (a general purpose
             timer for example or other time source), keeping in mind that Time base
             duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and
             handled in milliseconds basis.
        (++) Time base configuration function (HAL_InitTick ()) is called automatically
             at the beginning of the program after reset by HAL_Init() or at any time
             when clock is configured, by HAL_RCC_ClockConfig().
        (++) Source of time base is configured  to generate interrupts at regular
             time intervals. Care must be taken if HAL_Delay() is called from a
             peripheral ISR process, the Tick interrupt line must have higher priority
            (numerically lower) than the peripheral interrupt. Otherwise the caller
            ISR process will be blocked.
       (++) functions affecting time base configurations are declared as __weak
             to make  override possible  in case of other  implementations in user file.
\end{DoxyVerb}
 

\label{doc-func-members}
\Hypertarget{group___h_a_l___group1_doc-func-members}
\doxysubsubsubsubsection{Function Documentation}
\Hypertarget{group___h_a_l___group1_ga95911129a26afb05232caaaefa31956f}\index{Initialization and de-\/initialization Functions@{Initialization and de-\/initialization Functions}!HAL\_DeInit@{HAL\_DeInit}}
\index{HAL\_DeInit@{HAL\_DeInit}!Initialization and de-\/initialization Functions@{Initialization and de-\/initialization Functions}}
\doxysubsubsubsubsubsection{\texorpdfstring{HAL\_DeInit()}{HAL\_DeInit()}}
{\footnotesize\ttfamily \label{group___h_a_l___group1_ga95911129a26afb05232caaaefa31956f} 
\mbox{\hyperlink{stm32h7xx__hal__def_8h_a63c0679d1cb8b8c684fbb0632743478f}{HAL\+\_\+\+Status\+Type\+Def}} HAL\+\_\+\+De\+Init (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}



This function de-\/\+Initializes common part of the HAL and stops the systick. This function is optional. 


\begin{DoxyRetVals}{Return values}
{\em HAL} & status \\
\hline
\end{DoxyRetVals}
\Hypertarget{group___h_a_l___group1_gaecac54d350c3730e6831eb404e557dc4}\index{Initialization and de-\/initialization Functions@{Initialization and de-\/initialization Functions}!HAL\_Init@{HAL\_Init}}
\index{HAL\_Init@{HAL\_Init}!Initialization and de-\/initialization Functions@{Initialization and de-\/initialization Functions}}
\doxysubsubsubsubsubsection{\texorpdfstring{HAL\_Init()}{HAL\_Init()}}
{\footnotesize\ttfamily \label{group___h_a_l___group1_gaecac54d350c3730e6831eb404e557dc4} 
\mbox{\hyperlink{stm32h7xx__hal__def_8h_a63c0679d1cb8b8c684fbb0632743478f}{HAL\+\_\+\+Status\+Type\+Def}} HAL\+\_\+\+Init (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}



This function is used to initialize the HAL Library; it must be the first instruction to be executed in the main program (before to call any other HAL function), it performs the following\+: Configures the Sys\+Tick to generate an interrupt each 1 millisecond, which is clocked by the HSI (at this stage, the clock is not yet configured and thus the system is running from the internal HSI at 16 MHz). Set NVIC Group Priority to 4. Calls the \doxylink{stm32h7xx__hal__msp_8c_gae4fb8e66865c87d0ebab74a726a6891f}{HAL\+\_\+\+Msp\+Init()} callback function defined in user file "{}stm32h7xx\+\_\+hal\+\_\+msp.\+c"{} to do the global low level hardware initialization. 

\begin{DoxyNote}{Note}
Sys\+Tick is used as time base for the \doxylink{group___h_a_l___group2_gab1dc1e6b438daacfe38a312a90221330}{HAL\+\_\+\+Delay()} function, the application need to ensure that the Sys\+Tick time base is always set to 1 millisecond to have correct HAL operation. 
\end{DoxyNote}

\begin{DoxyRetVals}{Return values}
{\em HAL} & status \\
\hline
\end{DoxyRetVals}
\Hypertarget{group___h_a_l___group1_ga879cdb21ef051eb81ec51c18147397d5}\index{Initialization and de-\/initialization Functions@{Initialization and de-\/initialization Functions}!HAL\_InitTick@{HAL\_InitTick}}
\index{HAL\_InitTick@{HAL\_InitTick}!Initialization and de-\/initialization Functions@{Initialization and de-\/initialization Functions}}
\doxysubsubsubsubsubsection{\texorpdfstring{HAL\_InitTick()}{HAL\_InitTick()}}
{\footnotesize\ttfamily \label{group___h_a_l___group1_ga879cdb21ef051eb81ec51c18147397d5} 
\mbox{\hyperlink{stm32h7xx__hal__def_8h_a63c0679d1cb8b8c684fbb0632743478f}{HAL\+\_\+\+Status\+Type\+Def}} HAL\+\_\+\+Init\+Tick (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{Tick\+Priority}{}\end{DoxyParamCaption})}



This function configures the source of the time base. The time source is configured to have 1ms time base with a dedicated Tick interrupt priority. 

\begin{DoxyNote}{Note}
This function is called automatically at the beginning of program after reset by \doxylink{group___h_a_l___group1_gaecac54d350c3730e6831eb404e557dc4}{HAL\+\_\+\+Init()} or at any time when clock is reconfigured by HAL\+\_\+\+RCC\+\_\+\+Clock\+Config(). 

In the default implementation, Sys\+Tick timer is the source of time base. It is used to generate interrupts at regular time intervals. Care must be taken if \doxylink{group___h_a_l___group2_gab1dc1e6b438daacfe38a312a90221330}{HAL\+\_\+\+Delay()} is called from a peripheral ISR process, the Sys\+Tick interrupt must have higher priority (numerically lower) than the peripheral interrupt. Otherwise the caller ISR process will be blocked. The function is declared as \+\_\+\+\_\+weak to be overwritten in case of other implementation in user file. 
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em Tick\+Priority} & Tick interrupt priority. \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em HAL} & status \\
\hline
\end{DoxyRetVals}
\Hypertarget{group___h_a_l___group1_gaa2d4540edcb9dacec34edb77f3455bf0}\index{Initialization and de-\/initialization Functions@{Initialization and de-\/initialization Functions}!HAL\_MspDeInit@{HAL\_MspDeInit}}
\index{HAL\_MspDeInit@{HAL\_MspDeInit}!Initialization and de-\/initialization Functions@{Initialization and de-\/initialization Functions}}
\doxysubsubsubsubsubsection{\texorpdfstring{HAL\_MspDeInit()}{HAL\_MspDeInit()}}
{\footnotesize\ttfamily \label{group___h_a_l___group1_gaa2d4540edcb9dacec34edb77f3455bf0} 
\+\_\+\+\_\+weak void HAL\+\_\+\+Msp\+De\+Init (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}



De\+Initializes the MSP. 


\begin{DoxyRetVals}{Return values}
{\em None} & \\
\hline
\end{DoxyRetVals}
\Hypertarget{group___h_a_l___group1_gae4fb8e66865c87d0ebab74a726a6891f}\index{Initialization and de-\/initialization Functions@{Initialization and de-\/initialization Functions}!HAL\_MspInit@{HAL\_MspInit}}
\index{HAL\_MspInit@{HAL\_MspInit}!Initialization and de-\/initialization Functions@{Initialization and de-\/initialization Functions}}
\doxysubsubsubsubsubsection{\texorpdfstring{HAL\_MspInit()}{HAL\_MspInit()}}
{\footnotesize\ttfamily \label{group___h_a_l___group1_gae4fb8e66865c87d0ebab74a726a6891f} 
void HAL\+\_\+\+Msp\+Init (\begin{DoxyParamCaption}\item[{void}]{}{}\end{DoxyParamCaption})}



Initializes the MSP. 


\begin{DoxyRetVals}{Return values}
{\em None} & \\
\hline
\end{DoxyRetVals}
